﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="news_window_attr.aspx.cs"
    Inherits="Ccit.OA.NewsCenter.news_window_attr" %>
<%@ Register TagPrefix="ccit" Namespace="Ccit.ServerControls" Assembly="Ccit.ServerControls.ActionForm" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>信息中心-窗口属性设置</title>
    <script language="javascript" src="../script/jquery.js" type="text/javascript"></script>
    <script language="javascript" src="../script/StringClass_Ext.js" type="text/javascript"></script>
    <script language="javascript" src="../script/jsonlib.js" type="text/javascript"></script>
    <script language="javascript" src="../script/jcontrol.js" type="text/javascript"></script>
    <script language="javascript" src="../script/jwindow.js" type="text/javascript"></script>
    
    <script type="text/javascript" language="javascript">
       var selColor = "#CDCECF";
      //弹出选择Logo页面
      function doSelLogo() {
            var strURL = "sys_logo_sel.aspx";
            OpenWindow(strURL,"",560,350);
        }
        //返回选择图片的路径
        function doSetPlateLogo(picName) {            
            document.getElementById("_hidImgPath").value = picName;
            document.getElementById("imgLogo").style.display="inline";
           //document.getElementById("imgLogo").disabled="";
            var imgCtrl = document.getElementById("imgLogo");
            imgCtrl.src = picName;
        }
        //获取选中颜色
        function setcolor(elem){
          var oriHtCell;
          var destHtCell;
          
          if(selColor == elem) return;
          
          if(null != selColor && selColor !="undefined") {
             oriHtCell = findColorCell(selColor);
             oriHtCell.className = "tdCellUnSel";
          }      
          
          destHtCell = findColorCell(elem);
          destHtCell.className = "tdCellSel";
          selColor = elem;
          document.getElementById("_hidBorderColor").value=elem;
        }
        //编辑颜色
        function EditColor(){
          var elem = document.getElementById("_hidBorderColor").value;
          
          if(null == elem && elem =="undefined") return ;
          
          var oriHtCell;
          var destHtCell;
          
          if(selColor == elem) return;
          
          if(null != selColor && selColor !="undefined") {
             oriHtCell = findColorCell(selColor);
             oriHtCell.className = "tdCellUnSel";
          }      
          
          destHtCell = findColorCell(elem);
          destHtCell.className = "tdCellSel";
          selColor = elem;
          document.getElementById("_hidBorderColor").value=elem;
        }
        function findColorCell(colorSign) {
            var trPanel = document.getElementById("trColorPanel");
            var cellCount = trPanel.cells.length;
            var htcell;
            for(var i = 0; i < cellCount; i ++) {
                htcell = trPanel.cells(i);
                if(htcell.bgColor.toUpperCase() == colorSign.toUpperCase()) {
                    return htcell;
                }
            }
        }
    </script>
    <style type="text/css">
       .tdCellSel{border:red dashed;border-width:1 1 1 1} 
       .tdCellUnSel{border:white;border-width:0 0 0 0}
    </style>
</head>
<body onload="EditColor()">
    <ccit:ActionForm id="form1" runat="server">
        <!--编辑是板块ID-->
        <input type="hidden" value="" id="_hidPlateId" runat="server" />
        <!--选中颜色-->
        <input type="hidden" value="" id="_hidBorderColor" runat="server" />
        <!--选择logo图片路径-->
        <input name="_hidImgPath" type="hidden" id="_hidImgPath" runat="server" />   
        <input type="hidden" id="_hidType" runat="server" />
        <input type="button" style="display:none;" id="btnBorderColor" value="回选调色板" runat="server" />    
        <table cellpadding="0" cellspacing="0" width="100%" border="0">
            <tr>
                <td>
                    <fieldset id="Fieldset1" style="width:100%; height:100%; text-align:center" runat="server" >
                    <legend>窗口基本属性</legend>
                        <table  cellpadding="0" cellspacing="0" width="100%" height="130px" border="0">
                            <tr height="25px">
                              <td width="30%"  align="right"><font color="red">*</font>窗口名称&nbsp;</td>
                              <td>
                                <input type="text" value="" id="txtPlateName" runat="server"  class="input" style="width:165px"/>
                              </td>
                            </tr>
                            <tr height="25px">
                              <td width="30%" align="right">LOGO&nbsp;</td>
                              <td>
                                <nobr> 
                                    <img alt="" id="imgLogo" runat="server" style="height:24; width:24; display:none; "/>
                                    <a runat="server" href="javascript:doSelLogo()">选择图片</a>
                                </nobr>
                              </td>
                            </tr>
                            <tr  height="20px">
                              <td width="30%" valign="middle" align="right">边框颜色&nbsp;
                              </td>
                              <td>
                                  <TABLE cellSpacing="0" cellPadding="0"  width=100  border="0">
                                    <TBODY>
                                    <TR>
                                      <TD width="100%" >
                                        <TABLE cellSpacing="5" cellPadding="0"  width="100%" border="0">
                                          <TBODY>
                                          <TR id="trColorPanel">
                                            <TD bgColor="#CDCECF" style="cursor:hand" width=15 height=15 class="tdCellSel" onclick="setcolor('#CDCECF')">&nbsp;&nbsp;&nbsp;</TD>
                                            <TD bgColor="#CCFFFF" style="cursor:hand" width=15 height=15 onclick="setcolor('#CCFFFF')">&nbsp;&nbsp;&nbsp;</TD>
                                            <TD bgColor="#FFFFCC" style="cursor:hand" width=15 height=15 onclick="setcolor('#FFFFCC')">&nbsp;&nbsp;&nbsp;</TD>
                                            <TD bgColor="#FFCCCC" style="cursor:hand" width=15 height=15 onclick="setcolor('#FFCCCC')">&nbsp;&nbsp;&nbsp;</TD>
                                            <TD bgColor="#CC66FF" style="cursor:hand" width=15 height=15 onclick="setcolor('#CC66FF')">&nbsp;&nbsp;&nbsp;</TD>                                            
                                            <TD bgColor="#FFFF00" style="cursor:hand" width=15 height=15 onclick="setcolor('#FFFF00')">&nbsp;&nbsp;&nbsp;</TD>
                                            <TD bgColor="#123456" style="cursor:hand" width=15 height=15 onclick="setcolor('#123456')">&nbsp;&nbsp;&nbsp;</TD>
                                          </TR>
                                          </TBODY>
                                        </TABLE>
                                       </TD>
                                     </TR>
                                     </TBODY>
                                   </TABLE>
                              </td>
                            </tr>
                            <tr  height="20px">
                              <td width="30%"  align="right">显示条数&nbsp;</td>
                              <td>
                                <input type="text" value="" id="txtShowNum" class="input" runat="server" style="width:25px" /><font style="color:Red">　0表示显示全部记录</font>
                              </td>
                            </tr>
                            <tr  height="20px">
                              <td width="30%"  align="right">显示日期&nbsp;</td>
                              <td><asp:CheckBox ID="cbkShowDate" CssClass="checkbox" runat="server"></asp:CheckBox>&nbsp;显示</td>
                            </tr>
                            <tr  height="20px">
                              <td width="30%"  align="right">显示创建人&nbsp;</td>
                              <td>
                              <asp:CheckBox ID="cbkShowCreateor" CssClass="checkbox" runat="server"></asp:CheckBox>&nbsp;显示
                              </td>
                            </tr>
                        </table>
                        <table height="95px">
                            <tr height="95px">
                              <td colspan="2">&nbsp;</td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
            </tr>
        </table>
    </ccit:ActionForm>
</body>
</html>
